{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">站点配置</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="{:url('admin/system/updateSiteConfig')}" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">网站标题</label>
                        <div class="layui-input-block">
                            <input type="text" name="site_config[site_title]" value="{$site_config.site_title|default=''}" required  lay-verify="required" placeholder="请输入网站标题" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">SEO标题</label>
                        <div class="layui-input-block">
                            <input type="text" name="site_config[seo_title]" value="{$site_config.seo_title|default=''}" placeholder="请输入SEO标题" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">SEO关键字</label>
                        <div class="layui-input-block">
                            <input type="text" name="site_config[seo_keyword]" value="{$site_config.seo_keyword|default=''}" placeholder="请输入SEO关键字" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">SEO说明</label>
                        <div class="layui-input-block">
                            <textarea name="site_config[seo_description]" placeholder="请输入SEO说明" class="layui-textarea">{$site_config.seo_description|default=''}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">版权信息</label>
                        <div class="layui-input-block">
                            <input type="text" name="site_config[site_copyright]" value="{$site_config.site_copyright|default=''}" placeholder="请输入版权信息" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">ICP备案号</label>
                        <div class="layui-input-block">
                            <input type="text" name="site_config[site_icp]" value="{$site_config.site_icp|default=''}" placeholder="请输入版权信息" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">统计代码</label>
                        <div class="layui-input-block">
                            <textarea name="site_config[site_tongji]" placeholder="请输入统计代码" class="layui-textarea">{$site_config.site_tongji|default=''}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">推荐代码</label>
                        <div class="layui-input-block">
                            <textarea name="site_config[site_tuijian]" placeholder="请输入推荐代码" class="layui-textarea">{$site_config.site_tuijian|default=''}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">咨询代码</label>
                        <div class="layui-input-block">
                            <textarea name="site_config[site_zixun]" placeholder="请输入咨询代码" class="layui-textarea">{$site_config.site_zixun|default=''}</textarea>
                        </div>
                    </div>
<!--                    <div class="layui-form-item">
                        <label class="layui-form-label">联系QQ</label>
                        <div class="layui-input-block">
                            <input type="text" name="site_config[qq]" value="{$site_config.qq|default=''}" placeholder="请输入QQ号码" autocomplete="off" class="layui-input">
                        </div>
                    </div>-->
                    <div class="layui-form-item">
                        <label class="layui-form-label">热门关键字</label>
                        <div class="layui-input-block">
                            <input type="text" name="site_config[hot_keyword]" value="{$site_config.hot_keyword|default=''}" placeholder="请输入网站热门关键字 用|隔开  例如 朱总|教育" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">网站状态</label>
                        <div class="layui-input-block guanbi">
                            <input type="radio" name="site_config[status]" value="1" title="正常" {if condition="$site_config.status eq 1"}checked="checked"{/if}><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><span>正常</span></div>
                            <input type="radio" name="site_config[status]" value="0" title="关闭" {if condition="$site_config.status eq 0"}checked="checked"{/if}><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><span>关闭</span></div>
                        </div>
                    </div>
                    <div class="layui-form-item misosu" {if condition="$site_config.status neq 0"}style="display: none;"{/if}>
                        <label class="layui-form-label">关闭描述</label>
                        <div class="layui-input-block">
                            <textarea name="site_config[site_miaosu]" placeholder="请输入关闭描述" class="layui-textarea">{$site_config.site_miaosu|default=''}</textarea>
                        </div>
                    </div>
                    
                    <blockquote class="layui-elem-quote">注意哈！  更改系统配置请记得点击右上角清除缓存！</blockquote>
                    
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="*">提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script>
$(function(){
    $('.guanbi div').on('click',function(){
        if($(this).prev().val() ==0){
            $('.misosu').find('textarea').empty();
            $('.misosu').show();
        }else{
            $('.misosu').find('textarea').empty();
            $('.misosu').hide();
        }
    })
})
</script>
{/block}